package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采购单对象 order_list
 * 
 * @author ruoyi
 * @date 2025-08-15
 */
public class OrderList extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 公司ID */
    @Excel(name = "公司ID")
    private Long companyId;

    @Excel(name = "公司")
    private String companyName;

    /** 门店ID */
    @Excel(name = "门店ID")
    private Long shopId;

    @Excel(name = "门店")
    private String shopName;
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date ctime;

    /** 供货商接单时间 */
    @Excel(name = "供货商接单时间")
    private String acceptTime;
    /** 审核时间 */
    @Excel(name = "审核时间")
    private String reviewTime;

    /** 供货商接单时间 */
    @Excel(name = "供货商接单时间")
    private String takeTime;

    /** 商家确认订单时间 */
    @Excel(name = "商家确认订单时间")
    private String confirmTime;
    /** 送达时间 */
    @Excel(name = "送达时间")
    private String arriveTime;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 供货商ID */
    @Excel(name = "供货商ID")
    private Long supplyId;

    /** 供货商ID */
    @Excel(name = "供货商")
    private String supplyName;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 发起人ID */
    @Excel(name = "发起人ID")
    private Long userId;

    @Excel(name = "发起人")
    private String userName;

    /** 总价 */
    @Excel(name = "总价")
    private double price;

    /** 退款金额 */
    @Excel(name = "退款金额")
    private Double refundPrice;

    /** 品类数量 */
    @Excel(name = "品类数量")
    private Integer kind;

    private String statusin;
    /** 收货记录ID */
    private long receiveId;

    /** 创建日期 */
    private String day;

    /** 服务评分 */
    @Excel(name = "服务评分")
    private Double starService;

    /** 质量评分 */
    @Excel(name = "质量评分")
    private Double starQuality;

    /** 准时评分 */
    @Excel(name = "准时评分")
    private Double starTimely;

    @Excel(name = "是否支付")
    private String ispay;

    public String getStatusin() {
        return statusin;
    }

    public void setStatusin(String statusin) {
        this.statusin = statusin;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    public static OrderList fromJSON(JSONObject data){
        OrderList orderList = new OrderList();
        orderList.setCompanyId(data.getLong("companyId"));
        orderList.setShopId(data.getLong("shopId"));
        orderList.setAcceptTime(data.getString("acceptTime"));
        orderList.setArriveTime(data.getString("arriveTime"));
        orderList.setStatus(data.getString("status"));
        orderList.setSupplyId(data.getLong("supplyId"));
        orderList.setOrderNo(data.getString("orderNo"));
        orderList.setUserId(data.getLong("userId"));
        orderList.setPrice(data.getDouble("price"));
        orderList.setKind(data.getInteger("kind"));
        return orderList;
    }

    public String getIspay() {
        return ispay;
    }

    public void setIspay(String ispay) {
        this.ispay = ispay;
    }

    public String getSupplyName() {
        return supplyName;
    }

    public void setSupplyName(String supplyName) {
        this.supplyName = supplyName;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setCompanyId(Long companyId) 
    {
        this.companyId = companyId;
    }

    public Long getCompanyId() 
    {
        return companyId;
    }

    public void setShopId(Long shopId) 
    {
        this.shopId = shopId;
    }

    public Long getShopId() 
    {
        return shopId;
    }

    public void setCtime(Date ctime) 
    {
        this.ctime = ctime;
    }

    public Date getCtime() 
    {
        return ctime;
    }

    public void setAcceptTime(String acceptTime) 
    {
        this.acceptTime = acceptTime;
    }

    public String getAcceptTime() 
    {
        return acceptTime;
    }

    public void setArriveTime(String arriveTime) 
    {
        this.arriveTime = arriveTime;
    }

    public String getArriveTime() 
    {
        return arriveTime;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setSupplyId(Long supplyId) 
    {
        this.supplyId = supplyId;
    }

    public Long getSupplyId() 
    {
        return supplyId;
    }

    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setPrice(double price)
    {
        this.price = price;
    }

    public String getReviewTime() {
        return reviewTime;
    }

    public void setReviewTime(String reviewTime) {
        this.reviewTime = reviewTime;
    }

    public String getTakeTime() {
        return takeTime;
    }

    public void setTakeTime(String takeTime) {
        this.takeTime = takeTime;
    }

    public String getConfirmTime() {
        return confirmTime;
    }

    public void setConfirmTime(String confirmTime) {
        this.confirmTime = confirmTime;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public double getPrice()
    {
        return price;
    }

    public void setKind(Integer kind) 
    {
        this.kind = kind;
    }

    public Integer getKind() 
    {
        return kind;
    }

    public long getReceiveId() {
        return receiveId;
    }

    public void setReceiveId(long receiveId) {
        this.receiveId = receiveId;
    }

    public Double getRefundPrice() {
        return refundPrice;
    }

    public void setRefundPrice(Double refundPrice) {
        this.refundPrice = refundPrice;
    }

    public Double getStarService() {
        return starService;
    }

    public void setStarService(Double starService) {
        this.starService = starService;
    }

    public Double getStarQuality() {
        return starQuality;
    }

    public void setStarQuality(Double starQuality) {
        this.starQuality = starQuality;
    }

    public Double getStarTimely() {
        return starTimely;
    }

    public void setStarTimely(Double starTimely) {
        this.starTimely = starTimely;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("companyId", getCompanyId())
            .append("shopId", getShopId())
            .append("ctime", getCtime())
            .append("acceptTime", getAcceptTime())
                .append("reviewTime", getReviewTime())
                .append("takeTime", getTakeTime())
                .append("confirmTime", getConfirmTime())
            .append("arriveTime", getArriveTime())
            .append("status", getStatus())
            .append("supplyId", getSupplyId())
            .append("orderNo", getOrderNo())
            .append("userId", getUserId())
            .append("price", getPrice())
                .append("refundPrice", getRefundPrice())
            .append("remark", getRemark())
            .append("kind", getKind())
                .append("supplyName", getSupplyName())
                .append("receiveId", getReceiveId())

                .append("starService", getStarService())
                .append("starQuality", getStarQuality())
                .append("starTimely", getStarTimely())
            .toString();
    }
}
